package swtElements;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;

public class Form {

	ScrolledForm form;
	
	public Form(FormToolkit toolkit, TabFolder tabfolder){
		this.form = toolkit.createScrolledForm(tabfolder);
		
		GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 1;

		form.getBody().setLayout(gridLayout);

		form.setSize(SWT.DEFAULT, SWT.DEFAULT);
	}

	public Device getDisplay() {
		// TODO Auto-generated method stub
		return form.getDisplay();
	}

	public Composite getBody() {
		// TODO Auto-generated method stub
		return form.getBody();
	}
	
	public ScrolledForm getForm(){
		return form;
	}
}
